﻿using System;
using System.Collections.Generic;
using T.FAS.Runtime.ScheduleJob.Dao;
using T.FAS.Runtime.ScheduleJob.SPI;

namespace T.FAS.Runtime.ScheduleJob.Manager
{
    /// <summary>
    /// 系统执行频率管理
    /// </summary>
    public class SysExecuteFrequencyManager
    {
        private static readonly object lockObj = new object();
        private static SysExecuteFrequencyManager _manager = null;
        private SysExecuteFrequencyLogic logic = null;
        private SysExecuteFrequencyManager()
        {
            logic = new SysExecuteFrequencyLogic();
        }
        public static SysExecuteFrequencyManager GetInstance()
        {
            if (_manager == null)
            {
                lock (lockObj)
                {
                    if (_manager == null)
                        _manager = new SysExecuteFrequencyManager();
                }
            }
            return _manager;
        }
        public List<SysExecuteFrequency> GetSysExecuteFrequencies()
        {
            return logic.GetSysExecuteFrequencies();
        }
    }
}
